#ifndef GY_GRAPHICSLINEITEM_H
#define GY_GRAPHICSLINEITEM_H

#include "Graphics/BasicGraphics/GY_BasicsGraphicsObject.h"
#include "Graphics/GY_Object.h"
#include "GY_ControlLibrary_global.h"
#include <QGraphicsLineItem>
#include <QGraphicsItem>
#include <QGraphicsSceneMouseEvent>
#include <QPointF>
#include <QMetaType>

/**
 * @brief The GY_GraphicsLineItem class 画线图元基类
 */
class GY_CONTROLLIBRARY_EXPORT GY_GraphicsLineItem :public GY_BasicsGraphicsObject
{
    Q_OBJECT
public:
     explicit Q_INVOKABLE GY_GraphicsLineItem(const QString &guid,QGraphicsItem *parent = nullptr);
     explicit Q_INVOKABLE GY_GraphicsLineItem(const QString &guid,qreal x1, qreal y1, qreal x2, qreal y2, QGraphicsItem *parent = nullptr);
    ~GY_GraphicsLineItem();  

private:
    bool updatePoint(const QString &name, const QVariant &value);
    void initializationPropertyInfo();
    void updatePath(const QPointF &p1, const QPointF &p2);
};
//Q_DECLARE_METATYPE(GY_GraphicsLineItem)

#endif // GY_GRAPHICSLINEITEM_H
